package com.ruoyi.db.domain.web;

import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.List;

/**
 * 用户购物车对象 mp_client_cart
 * 
 * @author ruoyi
 * @date 2022-08-02
 */
@ApiModel(value = "MpClientCart",description = "用户购物车对象 mp_client_cart")
public class MpClientCart extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户购物车ID */
    private Long cartId;

    /** 用户ID */
    @ApiModelProperty(value="用户ID",name="MpClientCart$clientId")
    @Excel(name = "用户ID")
    private Long clientId;

    /** 购物车总金额 */
    @ApiModelProperty(value="购物车总金额",name="MpClientCart$totalAmount")
    @Excel(name = "购物车总金额")
    private BigDecimal totalAmount;

    public List<MpClientSubCart> getChilds() {
        return childs;
    }

    public void setChilds(List<MpClientSubCart> childs) {
        this.childs = childs;
    }

    private List<MpClientSubCart> childs;

    public void setCartId(Long cartId) 
    {
        this.cartId = cartId;
    }

    public Long getCartId() 
    {
        return cartId;
    }
    public void setClientId(Long clientId) 
    {
        this.clientId = clientId;
    }

    public Long getClientId() 
    {
        return clientId;
    }
    public void setTotalAmount(BigDecimal totalAmount) 
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount() 
    {
        return totalAmount;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("cartId", getCartId())
            .append("clientId", getClientId())
            .append("totalAmount", getTotalAmount())
            .append("createTime", getCreateTime())
            .toString();
    }
}
